<?php

/**
 * cmsEntry form.
 *
 * @package    cms
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class cmsEntryForm extends BasecmsEntryForm
{
  public function configure()
  {
    parent::configure();
    
    unset($this['created_at'], $this['updated_at'], $this['file_id']);    
    
    $label = sfContext::getInstance()->getI18N()->__('File');   
    
    $this->widgetSchema['file'] = new sfWidgetFormInputFileEditable(array(
    'label'     => $label,
    'file_src'  => '/uploads/entry/'.$this->getObject()->getCmsFile().'_m.'.$this->getObject()->getCmsFile()->getExtension(),
    'is_image'  => true,
    'edit_mode' => !$this->isNew(),
    'template'  => '<div>%file%<br />%input%<br />%delete% %delete_label%</div>',
    ));
      
  }
}
